package flowcontrol

import "fmt"
import "time"
func DemoFor1()  {
	for i, j := 0, 10; i < j; i, j = i+1, j+1{ 
		fmt.Println("i, j", i, j)
		done := make(chan bool, 1)
		synworker(done)
		fmt.Println(<- done)
	}
}

func synworker(done chan bool) {
	fmt.Print("working...")
	time.Sleep(time.Second)
	fmt.Println("done")

	done <- true
}